package com.uphone.kingmall.adapter;

import android.widget.ImageView;

import com.blankj.utilcode.util.SizeUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.china.zhuoyue.R;
import com.uphone.kingmall.bean.HaggleListBean;
import com.uphone.kingmall.utils.GlideUtils;

/**
 * <pre>
 *     author : radish
 *     e-mail : 15703379121@163.com
 *     time   : 2019/3/19
 *     desc   :
 * </pre>
 */
public class HaggleListAdapter extends BaseQuickAdapter<HaggleListBean.DataBean, BaseViewHolder> {
    public HaggleListAdapter() {
        super(R.layout.kingmall_item_haggle_list);
    }

    @Override
    protected void convert(BaseViewHolder helper, HaggleListBean.DataBean item) {
        helper.setText(R.id.tv_goods_name, item.getGoodsName() + "");
        helper.setText(R.id.tv_price, "¥" + item.getUnhagglePrice());
        ImageView ivImage = helper.getView(R.id.iv_shop);
        GlideUtils.getInstance().loadCornerImage(mContext, item.getGoodsMainImg(), SizeUtils.dp2px(2), ivImage);
    }
}
